package com.hh.front.controller;

import com.hh.common.response.CommonResult;
import com.hh.service.service.impl.MaintenanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("api/front/maintenance")
public class MaintenanceController {

    @Autowired
    private MaintenanceService maintenanceService;

    @RequestMapping(value = "/systemMaintenance", method = RequestMethod.POST)
    public CommonResult<Boolean> systemMaintenance(@RequestParam(value = "sysType") Integer sysType,@RequestParam(value = "code") String code,@RequestParam(value = "type") Integer type){
        return CommonResult.success(maintenanceService.systemMaintenance(sysType,code,type));

    }

    @RequestMapping(value = "/test01", method = RequestMethod.POST)
    public CommonResult<Boolean> test01(@RequestParam(value = "orderId") String orderId){
        return CommonResult.success(maintenanceService.test01(orderId));

    }
}
